<template>
  <div class="curmb">
    <el-breadcrumb separator="/">
      <template v-for="item in breadcrumb" :key="item.name">
        <el-breadcrumb-item :to="item.path">{{ item.name }}</el-breadcrumb-item>
      </template>
    </el-breadcrumb>
  </div>
</template>

<script setup lang="ts">
import { mapPathToBreadcrumbs } from "@/utils/map-menus"
import userLoginStore from "@/stores/login/login"
import { useRoute } from "vue-router"
import { computed } from "vue"

const route = useRoute()
const userMenus = userLoginStore().userMenus
const breadcrumb = computed(()=>{
  return mapPathToBreadcrumbs(route.path, userMenus)
})
// console.log(breadcrumb)
</script>
<style scoped lang="less"></style>
